/*
 * @Title: 
 * @Created by: ycq
 */
<template>
	<view class="to-top" v-if='showTop' @click="toTop">
		<image style="width: 50upx;height: 50upx;margin: 25upx;transform: rotate(270deg);" src="/static/jiantou.png" mode=""></image>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				showBtn:false
			}
		},
		methods: {
			toTop(){
				uni.pageScrollTo({
				scrollTop: 0,
				duration: 100
				});
			}
		},
		created(){
			
		},
		computed: {
			showTop() {
				return this.$store.state.showToTop
			}
		},
	}
</script>

<style scoped>
	.to-top{
		width: 100upx;
		height: 100upx;
		position: fixed;
		right: 0;
		top: 70vh;
		z-index: 20;
		background: rgba(0,0,0,0.5);
	}
</style>
